﻿@* Muaz Khan – http://dashingquill.web.officelive.com *@
@{
    var user = Static.CurrentUser;
    var Is_Logged_In = user != null;
    if(Is_Logged_In)
    {
        ViewBag.Title = user.FullName.Truncate(20) + " - Account Settings";
    }
}

@section Meta
{
    <link href="@Url.Content("~/Content/Styles/dashingquill.settings.css")" rel="stylesheet" type="text/css" />
}
@section UserName
{    
    @if(user != null)
    {
        <div id="you" accesskey="@user.UniqueToken">@user.FullName.Truncate(20)</div>
    }
}

@section H1 
{
    @if (Is_Logged_In)
    {
        <h1>@user.FullName.Truncate(20) - Account Settings</h1>
    }
}

@if (Is_Logged_In)
{ 
    <div id="separator">
        <h2>@user.FullName.Truncate(20)! Your account settings! <span id="on-saving-changes" style="color: red; font-weight: normal; display:none;"> --- Changes saved successfully --- </span></h2>
    </div>
    <div id="account-section">
        <div>
            <label for="fullname">
                Full Name</label>
            <input type="text" id="fullname" name="fullname" value="@user.FullName" placeholder="Full Name" />
        </div>        
        <div>
            <label for="website">
                Website</label>
            <input type="text" id="website" name="website" value="@(user.Website != null ? user.Website : "")" placeholder="Website" />
        </div>
        <div>
            <label for="about-you">
                About</label>
            <textarea id="about-you" name="about-you" style="resize:vertical;">@(user.About != null ? user.About.ResolveForEdit() : "")</textarea>
        </div>
        <div style="padding-top: 10px;">
            <div id="save-changes" class="green-button" style="margin-left: 100px;">Save Changes</div>
        </div>
    </div>
}    
@section JavaScript
{
    <script src="@Url.Content("~/Content/JavaScript/dashingquill.settings.js")" type="text/javascript"></script>
    <script>
        settings.handleEvents();
    </script>
}
<div class="delete-account-section" style="text-align:center; padding:10px;">
    <div id="delete-account-request" class="red-button">
        Delete your account - all tweets - all circles - and everything - permanently
    </div>
</div>


<div id="verify-delete-account-request">
    <div>
        You are about to permanently delete not only your account but also your tweets,
        circles and everything else.
    </div>
    <div style="margin-top:10px; margin-bottom:20px;">
        Are you agreeing to delete your account permanently?
    </div>
    <div id="delete-account-permanently" class="red-button">
        Delete Account Permanently</div>
    <div id="never">
        No, Never</div>
</div>
<input type="hidden" id="securityToken" value="@RandomNumbers.SecurityTokenForAccountDeleteRequest" />